package behavior.strategy;

public class StrategyTest {

    public static void main(String[] args) {
        int a = 4,b = 2;
        CalculatorContext context = new CalculatorContext(new ConcreteStrategy.OperationAdd());
        System.out.println("a + b = "+context.executeStrategy(a, b));

        CalculatorContext context2 = new CalculatorContext(new ConcreteStrategy.OperationSub());
        System.out.println("a - b = "+context2.executeStrategy(a, b));

        CalculatorContext context3 = new CalculatorContext(new ConcreteStrategy.OperationMul());
        System.out.println("a * b = "+context3.executeStrategy(a, b));

        CalculatorContext context4 = new CalculatorContext(new ConcreteStrategy.OperationDiv());
        System.out.println("a / b = "+context4.executeStrategy(a, b));
    }

}
